import { createStore } from 'vuex'

export default createStore<StoreState>({
    state: {
        user: undefined,
        dict_category: undefined,
        designer: undefined,
    },
    mutations: {
        setLoginUser(state, user) {
            state.user = user
        },
        logout(state) {
            state.user = undefined
        },

        setDictCategoryList(state, dict_category) {
            state.dict_category = dict_category
        },

        setDesigner(state, designer) {
            state.designer = designer
        },
    }
})